package com.heboan.code3;

/*
    手机卡
*/

public class SimCard {
    // 卡类型
    private CardType type;
    // 卡号
    private String id;
    // 用户名
    private String name;
    // 密码
    private String password;
    // 余额
    private double balance;
    // 通话时长（分钟）
    private int duration;
    // 上网流量
    private int traffic;

    public SimCard() {
    }

    public SimCard(CardType type, String id, String name, String password, double balance, int duration, int traffic) {
        this.type = type;
        this.id = id;
        this.name = name;
        this.password = password;
        this.balance = balance;
        this.duration = duration;
        this.traffic = traffic;
    }

    public CardType getType() {
        return type;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getPassword() {
        return password;
    }

    public double getBalance() {
        return balance;
    }

    public int getDuration() {
        return duration;
    }

    public int getTraffic() {
        return traffic;
    }

    public void setType(CardType type) {
        this.type = type;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public void setTraffic(int traffic) {
        this.traffic = traffic;
    }


    // 显示（卡号 + 用户名 + 当前余额）
    public void show(){
        System.out.println("卡号：" + getId() + ", 用户名：" + getName() + ", 当前余额:" + getBalance());
    }
}
